<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>我的购物车</title>
</head>

<body>
    <h1>这是您的购物车</h1>
    <span>
            <a th:if="${session.loginUser==null}" href="http://login.zkjshop.com:9000/view/login?target=http://cart.zkjshop.com:9030/view/cart">登录</a>
            <a th:unless="${session.loginUser==null}" href="http://www.zkjshop.com:9000/login/out" onclick="out()" >退出</a>    </span>

    <p th:unless="${session.loginUser == null}">
        <span style="color: deepskyblue" th:text="${session.loginUser.userName}"></span>已登录
    </p>

</body>
<script>
    function out(){
        alert("退出成功，请重新登录！")
    }
</script>

</html>